package com.untrance.shop.model;

import com.google.appengine.api.datastore.Key;
import com.untrance.shop.common.enums.AvailabilityType;

import javax.persistence.*;
import java.util.List;

/**
 * @author eugene zadyra
 */
@Entity
public class Product extends MainEntity {

	@Column(nullable = false)
	private String name;
	private String shortDescription;
	private String longDescription;
	private Float oldPrice;
	private Float newPrice;
	@Enumerated(EnumType.ORDINAL)
	private AvailabilityType availability;
	@Basic
	private Key userKey;
	private String imageName;
	@Basic
	private Key categoryKey;

	@Basic
	private List<Key> additionalImages;

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getShortDescription() {
		return shortDescription;
	}

	public void setShortDescription(String shortDescription) {
		this.shortDescription = shortDescription;
	}

	public String getLongDescription() {
		return longDescription;
	}

	public void setLongDescription(String longDescription) {
		this.longDescription = longDescription;
	}

	public Float getOldPrice() {
		return oldPrice;
	}

	public void setOldPrice(Float oldPrice) {
		this.oldPrice = oldPrice;
	}

	public Float getNewPrice() {
		return newPrice;
	}

	public void setNewPrice(Float newPrice) {
		this.newPrice = newPrice;
	}

	public AvailabilityType getAvailability() {
		return availability;
	}

	public void setAvailability(AvailabilityType availability) {
		this.availability = availability;
	}

	public void setUserKey(Key userKey) {
		this.userKey = userKey;
	}

	public Key getUserKey() {
		return userKey;
	}

	public void setImageName(String imageName) {
		this.imageName = imageName;
	}

	public String getImageName() {
		return imageName;
	}

	public void setCategoryKey(Key categoryKey) {
		this.categoryKey = categoryKey;
	}

	public Key getCategoryKey() {
		return categoryKey;
	}

	public List<Key> getAdditionalImages() {
		return additionalImages;
	}

	public void setAdditionalImages(List<Key> additionalImages) {
		this.additionalImages = additionalImages;
	}
}
